import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("user")
export class UserEntity {
    @PrimaryGeneratedColumn()
    id:number; // 标记为主列，值自动生成

    @Column({
        type: "varchar",
        name:'name'
    })
    name: string;

    @Column({
        type: "varchar",
        name:'password'
    })
    password: string;

    @Column({
        type: "varchar",
        name:'phone'
    })
    phone: string;
    @Column({
        type: "int",
        name:'role'
    })
    role: number;
    @Column({
        type: "varchar",
        name:'like'
    })
    like: string;
}